package org.hydrakyoufeng.stuplatform.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 定义系统中需要用到的对象
 */
@Configuration
public class BaseConfig {

    /**
     * 用于保存当前线程中登录管理员的ID
     * @return
     */
    @Bean
    public ThreadLocal<Integer> adminIdTheadLocal() {
        return new ThreadLocal<>();
    }

    @Bean
    public ThreadLocal<Integer> userIdTheadLocal() {
        return new ThreadLocal<>();
    }
}
